import request from '@/utils/request'

// 执行SQL查询
export function executeSql(sql, dataSource, pageNum, pageSize) {
  return request({
    url: '/sqlquery/execute',
    method: 'post',
    params: {
      sql,
      dataSource,
      pageNum,
      pageSize
    }
  })
}

// 获取表列表
export function getTableList(dataSource) {
  return request({
    url: '/sqlquery/tables',
    method: 'get',
    params: { dataSource }
  })
}

// 获取schema列表
export function getSchemaList(dataSource) {
  return request({
    url: '/sqlquery/schema/list',
    method: 'get',
    params: { dataSource }
  })
} 